<?php
use \sy\lib\YHtml;
?>
<!DOCTYPE html>
<html>
<head>
	<title>登录</title>
	<?=Sy::view('common/header_oauth')?>
</head>
<body>
	<nav class="navbar">
		<div class="wrapper">EUser</div>
	</nav>
	<div class="wrapper">
		<div class="login-form">
			<iframe src="<?=Sy::createUrl(['user/login', 'callback' => 'loginCallback', 'appid' => '563cbb80474bdd821ef3ce1f'])?>"></iframe>
		</div>
		<div class="scope">
			<p><strong>该应用请求了以下权限：</strong></p>
			<?php
			foreach ($scope as $onescope) {
				echo '<p>', Sy::model('oauth')->getScopeDescription($onescope), '</p>';
			}
			?>
		</div>
	</div>
	<script>
	window.eu = {
		"url": "<?=Sy::createUrl('oauth/getAuthorizeCode', 'json')?>",
		"redirect_uri": "<?=addslashes($redirect_uri)?>",
		"state": "<?=addslashes($state)?>",
		"client_id": "<?=$client_id?>"
	}
	</script>
	<?=Sy::view('common/footer_oauth')?>
</body>
</html>